package functional;

import org.omg.CosNaming.BindingIterator;

import java.util.function.Function;

/**
 * @author lyx
 * @Date 2021/6/26 11:48
 * (参数类型, 返回类型)
 */
public class FunctionTest {
    public static void main(String[] args) {
        Function<String , Integer> function = str->{
            if(str!=null){
                return 1;
            }else
                return 0;
        };
        System.out.println(function.apply("com.www"));
    }
}
